# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(len(b[i])):
            print(b[i][j], end=" ")
        print()


# 创建一个二维数组 长度为row 宽度为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


def main():

    b = create2d(3, 4)
    for i in range(len(b)):
        b[i] = list(map(int, input().split()))

    MAX = b[0][0]
    x = 0
    y = 0

    for i in range(len(b)):
        for j in range(len(b[i])):
            if b[i][j] > MAX:
                MAX = b[i][j]
                x = i
                y = j

    print(MAX)
    print(y + 1)
    print(x + 1)


main()
